<extend name="Common/layout" />

<block name="content" >

<div id="content">
    <div class="page-header">
      <div class="container-fluid">
        <div class="pull-right">
          <a href="" data-toggle="tooltip" title="新增" class="btn btn-primary">
            <i class="fa fa-plus"></i>
          </a>
          <a href="" data-toggle="tooltip" title="重建" class="btn btn-default">
            <i class="fa fa-refresh"></i>
          </a>
          <button type="button" data-toggle="tooltip" title="删除" class="btn btn-danger" onclick="confirm('确认？') ? $('#form-category').submit() : false;">
            <i class="fa fa-trash-o"></i>
          </button>
        </div>
        <h1>商品分类</h1>
        <ul class="breadcrumb">
          <li>
            <a href="">首页</a>
          </li>
          <li>
            <a href="">商品分类</a>
          </li>
        </ul>
      </div>
    </div>
    <div class="container-fluid">
      <div class="panel panel-default">
        <div class="panel-heading">
          <h3 class="panel-title">
            <i class="fa fa-list"></i>
            商品分类列表
          </h3>
        </div>
        <div class="panel-body">
          <form action="" method="post" enctype="multipart/form-data" id="form-category">
            <div class="table-responsive">
              <table class="table table-bordered table-hover">
                <thead>
                  <tr>
                    <td style="width: 1px;" class="text-center">
                      <input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);" />
                    </td>
                    <td class="text-left">
                      <a href="" class="asc">分类名称</a>
                    </td>
                    <td class="text-right">
                      <a href="">分类顺序</a>
                    </td>
                    <td class="text-right">编辑分类</td>
                  </tr>
                </thead>
                <tbody>
                <volist name="list" id="row">
                  <tr>
                    <td class="text-center">
                      <input type="checkbox" name="selected[]" value="{$row['category_id']}" />
                    </td>
                    <td class="text-left">
                      {:str_repeat('&nbsp;', $row['level']*4)}
                      <a href=""><i class="fa fa-plus"></i></a>
                      {$row['title']}
                    </td>
                    <td class="text-right">{$row['sort_number']}</td>
                    <td class="text-right">
                      <a href="" data-toggle="tooltip" title="编辑" class="btn btn-primary">
                        <i class="fa fa-pencil"></i>
                      </a>

                      <a href="{:U('delete', ['id'=>$row['category_id']])}" data-toggle="tooltip" title="删除" class="btn btn-primary">
                        <i class="fa fa-trash-o"></i>
                      </a>

                    </td>
                  </tr>
                </volist>


                </tbody>
              </table>
            </div>
          </form>
          <div class="row">
            <div class="col-sm-6 text-left">
              <ul class="pagination">
                <li class="active">
                  <span>1</span>
                </li>
                <li>
                  <a href="">2</a>
                </li>
                <li>
                  <a href="">&gt;</a>
                </li>
                <li>
                  <a href="">&gt;|</a>
                </li>
              </ul>
            </div>
            <div class="col-sm-6 text-right">显示开始 1 到 20 之 23 （总 2 页）</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</block>
